﻿using System.ComponentModel.DataAnnotations;
using ContactManagement.App_GlobalResources;

namespace ContactManagement.Models
{
    /// <summary>
    /// Model für das Kontaktformular
    /// </summary>
    public class ContactModel
    {
        /// <summary>
        /// Die Mailadresse die im Kontaktformular angegeben werden muss
        /// </summary>
        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "EmailRESX", ResourceType = typeof(HomeViews))]
        [RegularExpression(WebConstants.EmailRegularExpString, ErrorMessageResourceName = "InvalidEMailAddressRESX", ErrorMessageResourceType = typeof(SystemMessages))]
        public string EMail { get; set; }

        /// <summary>
        /// Firmenname
        /// </summary>
        [Required]
        [Display(Name = "CompanyRESX", ResourceType = typeof(HomeViews))]
        public string CompanyName { get; set; }

        /// <summary>
        /// Der Freitext der im Kontaktformular angegeben werden soll
        /// </summary>
        [Required]
        [DataType(DataType.MultilineText)]
        [Display(Name = "MessageRESX", ResourceType = typeof(HomeViews))]
        public string Message { get; set; }

        /// <summary>
        /// Ansprechpartner 
        /// </summary>
        [Required]
        [Display(Name = "NameRESX", ResourceType = typeof(HomeViews))]
        public string Name { get; set; }

        /// <summary>
        /// Telephone
        /// </summary>
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "TelephoneRESX", ResourceType = typeof(HomeViews))]
        public string Telephone { get; set; }
    }
}